#include "WindowManager.h"


WindowManager::WindowManager(void)
{
	scale = 30.f;
	font.loadFromFile("fonts/futuram.ttf");
	offset = 0;

}


WindowManager::~WindowManager(void)
{
}

sf::Vector2f WindowManager::getCenter(void)
{
	int centerX = getSize().x;
	int centerY = getSize().y;
	sf::Vector2f center = sf::Vector2f(centerX/2, centerY/2);
	return center;
}

float WindowManager::getCenterX()
{
	return getCenter().x;
}

float WindowManager::getCenterY()
{
	return getCenter().y;
}

float WindowManager::getWidth()
{
	return getSize().x;
}

float WindowManager::getHeight()
{
	return getSize().y;
}

float WindowManager::reverseHeight(float h)
{
	return getHeight()-h;
}

float WindowManager::getScale()
{
	return scale;
}


sf::Font* WindowManager::getFont()
{
	return &font;
}

void WindowManager::addOffset(float amount)
{
	sf::View v = getView();
	v.move(amount, 0);
	offset += amount;
	setView(v);
}

float WindowManager::getOffset()
{
	return offset;
}

Background* WindowManager::getBackground()
{
	return &background;
}

sf::Vector2f WindowManager::getMousePosition()
{
	return sf::Vector2f(sf::Mouse::getPosition());
}